﻿using Abp.Application.Services.Dto;
using shenghua.Marketing.SalesPromotions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace shenghua.Marketing.SalesPromotions.Dto
{
    public class SalesPromotionDto: EntityDto
    {
        public string Name { get; set; }
        public DateTime BeginTime { get; set; }
        public int Hours { get; set; }
        public int Minutes { get; set; }
        public DateTime EndTime { get; set; }
        public Double Price { get; set; }
        public List<int> AppliedCommodityIds { get; set; }
        public SalesPromotionTargetType TargetType { get; set; }
        public bool IsOngoing { get; set; }
        public bool IsFinished { get; set; }
        public bool IsNotStarted { get; set; }

        public SalesPromotionDto(SalesPromotion obj)
        {
            Id = obj.Id;
            Name = obj.Name;
            BeginTime = obj.BeginTime;
            Hours = obj.Hours;
            Minutes = obj.Minutes;
            EndTime = obj.EndTime;
            Price = obj.Price;
            AppliedCommodityIds = obj.AppliedCommodityIds.Items;
            TargetType = obj.TargetType;
            IsOngoing = obj.IsOngoing;
            IsFinished = obj.IsFinished;
            IsNotStarted = obj.IsNotStarted;
        }
    }
}
